var getNum1 = (n) => {
    let promise = new Promise((resolve, reject) => {
        setTimeout(() => resolve(n + 10), 1000);
    });
    return promise;
}

var getNum2 = (n) => {
    let promise = new Promise((resolve, reject) => {
        setTimeout(() => reject(n + 10), 1800);
    });
    return promise;
}

var getNum3 = (n) => {
    let promise = new Promise((resolve, reject) => {
        setTimeout(() => resolve(n + 10), 1500);
    });
    return promise;
}

var getNum4 = (n) => {
    let promise = new Promise((resolve, reject) => {
        setTimeout(() => reject(n + 10), 4000);
    });
    return promise;
}

var p = Promise.allSettled([getNum1(1), getNum2(2), getNum3(3), getNum4(4)])
    .then((...result) => console.log("resolve", ...result), (...result) => console.log("reject", ...result));